package handler

import (
	"chaoyer/ghost_assist/handler/post"
	"github.com/gin-gonic/gin"
	"chaoyer/ghost_assist/handler/visitor"
	"chaoyer/ghost_assist/handler/comment"
)

func RouteInit(r *gin.Engine) {

	// 查询阅读数
	r.GET("/pv", visitor.GetPv)
	// 阅读数增加
	r.POST("/pv", visitor.AddPv)
	// 评论添加
	r.POST("/comment", comment.AddComment)
	// 文章的评论
	r.GET("/comment", comment.GetByPost)

	r.GET("/search",post.Search)

	r.GET("/blog_config",post.GetBlogConfig)

	r.POST("/refresh",post.RefreshPost)
}
